The invention relates to an apparatus for machining a workpiece, comprising means for clamping the workpiece, means for rotatingly driving the clamped workpiece, a tool for machining the workpiece, said tool having a part for engaging the workpiece, a tool holder, means for moving the tool holder with respect to the clamping means, measuring means for measuring the position of the tool holder in a x- and a y-direction, and a control unit with a memory for one or more control programs, in which one or more paths of movement of the tool holder are stored as x,y-positions thereof. The control unit is arranged to control the moving means according to a control program by means of the x,y-positions provided by said x,y-measuring means in such a manner that the tool follows a desired path along the clamping means for machining the workpiece. A measuring device can be located at a predetermined reference position with respect to the moving means for measuring the contour of said tool part. The control unit is arranged to compare this shape with a previously stored shape of said tool part. The control unit adapts the control program for the corresponding tool if differences are found.
Such apparatus are known in different embodiments and can be made for shaping the workpiece by removing material or not. Known apparatus are for example lathes, spinning machines or the like. In the known apparatus a control program is generally stored in the memory during a teaching phase, whereafter during the production phase the control unit controls the moving means in accordance with the control program, so that the tool is moved according to the desired path along the clamping means, and thereby, along the clamped workpiece for obtaining the desired machining of the workpiece. In, a known apparatus the problem arises in that with a change of the tool or machining of the tool, the position of the part of this tool engaging the workpiece and the shape thereof do not correspond anymore with the position and shape during the teaching phase. It is then necessary to repeat the teaching phase to establish a new control program.
U.S. Pat. No. 5,255,199 discloses an apparatus of the above-mentioned type, wherein it is attempted to avoid this disadvantage by adding a camera and a vision computer to the apparatus. To obtain an image of the tool, the tool is moved into a reference position. The vision computer can compute a contour of the tool from the image obtained. In this known apparatus, complicated computations are necessary to alter the control program in case of a possible change of the contour of the tool, whereas moreover, a calibration of the vision computer on the control unit, i.e. the x,y-measuring means, is required. In this known apparatus, computation errors lead to manufacturing errors of the product to be manufactured, whereas changes in the x,y-measuring means require a new calibration or lead to further manufacturing errors. Moreover, temperature appears to have a relatively high effect on the accuracy of the known apparatus.